package cqu.mvc.model.domain;
// import org.hibernate.annotations.GenericGenerator;
// import javax.xml.bind.annotation.XmlID;
import javax.persistence.*;
// import java.io.File;

/**
 * 定义需要上传的文件类
 * "@Entity"说明这个class是实体类，并且使用默认的orm规则，即class名就是数据库表中表明，class字段名即表中字段名
 */
@Entity 
public class FileEntity {

    @Id 
    @Column(length=50,nullable=false)
    private String id;

    @Column(length=50,nullable=false)
    private String name;

    private byte[] fileByte;

    public FileEntity(){

    }

    public FileEntity(String id,String name){
        super();
        this.id = id;
        this.name = name;
    }
    //获取id
    public String getId(){
        return id;
    }
    //获取name
    public String getName(){
        return name;
    }
    //获取文件
    public byte[] getFileByte(){
        return fileByte;
    }
    //设置id
    public void setId(String id){
        this.id = id;
    }
    //设置name
    public void setName(String name){
        this.name = name;
    }
    //设置文件
    public void setFileByte(byte[] fileByte){
        this.fileByte = fileByte;
    }
}
